﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class JOINT_frmJ_IntroCompManager : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ((JOINT_MstPage_JOINT)this.Master).changeTitle("派遣元企業情報管理");
        ((JOINT_MstPage_JOINT)this.Master).HideLiArea("");
        #region luclt
        Session.Remove("JS00030F_List");
        Session.Remove("JS00030F_textbox");
        #endregion
      
        if (!IsPostBack)
        {
            //Contructer session
            Session.Remove("本社情報frmJ_IntroCompBasicInput");
            Session.Remove("frmJ_JointCompBasicInfoRef_Mode");
            
            if (Session["役"] == null || Session["役"].ToString() == "")
            {
                Response.Redirect("~/frmD_Login.aspx");
            }
            if (Session["役"] != null && Session["役"].ToString() == "1" ) // Role = 1 not update data
            {
                btn_派遣元企業情報参照.Enabled = false;
            }
            if (Session["役"].ToString() == "3") // Role = 3 not update and insert only review
            {
                btn_新規派遣元企業情報登録.Enabled = false;
                btn_派遣元企業情報参照.Enabled = true;
            }
        }
        
    }

   
    protected void btn_新規派遣元企業情報登録_Click(object sender, ImageClickEventArgs e)
    {
        Response.Redirect("~/JOINT/frmJ_IntroCompBasicInput.aspx"); 
    }

    protected void btn_派遣元企業情報参照_Click(object sender, ImageClickEventArgs e)
    {
        if (Session["役"] != null && Session["役"].ToString() != "1")
        {
            //Use check submit button 派遣元企業情報参照
            Session["frmJ_IntroCompManager_Flag"] = "1";
            Session.Remove("frmJ_MCompManager_Flag");
            Response.Redirect("~/JOINT/frmJ_IntroCompList.aspx");

        }
        
    }
}
